home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Essentials / Developer Essentials Nov 90 / Apple II / Apple.II.partition / Tools / Technical.Notes / IIGS / TN.IIGS.091 < prev    next >
Encoding:
Text File  |  1990-09-21  |  6.3 KB  |  132 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6. Apple IIgs
  7. #91:    The Wonderful World of Universal Access
  8.  
  9. Written by:    Don J. Brady & Matt Deatherage                  September 1990
  10.  
  11. This Technical Note discusses how your applications can be compatible with 
  12. Universal Access software.
  13. _____________________________________________________________________________
  14.  
  15.  
  16. What's "Universal Access?"
  17.  
  18. Universal Access is the name given to software components designed to make 
  19. Apple computers (in this case, the Apple IIgs) more accessible to people who 
  20. might have difficulty using them.  The Apple IIgs is very dependent on graphic 
  21. objects, a keyboard and mouse; not all people can use these things very 
  22. easily.
  23.  
  24. There are several components to Apple's Universal Access software:
  25.  
  26.   o  CloseView.  CloseView magnifies the Apple IIgs screen so that it's 
  27.      more easily seen by those with visual impairments.  The hardware 
  28.      screen contains a magnification from two to twelve times as large 
  29.      as the "real" 32K Super Hi-Res graphics screen.
  30.  
  31.   o  Video Keyboard.  Video Keyboard is a New Desk Accessory that 
  32.      emulates a keyboard.  A picture of a keyboard appears on the 
  33.      screen; a mouse-down event in any "key" makes Video Keyboard post 
  34.      a key-down event, so you can use a pointing device as a keyboard.  
  35.      ADB hardware is available to allow people to use head gear or 
  36.      other devices instead of mice; Video Keyboard lets these same 
  37.      devices replace the keyboard as well.
  38.  
  39.   o  Easy Access.  Easy Access makes the keyboard easier to use for 
  40.      those who have trouble pressing more than one key at a time.  Easy 
  41.      Access comes in two parts.  Sticky Keys is activated by pressing 
  42.      the shift key five times in succession; while Sticky Keys is 
  43.      activated, modifier keys may be released and still apply to the 
  44.      next keystroke.  Keyboard mouse allows the numeric keypad to be 
  45.      used as a mouse substitute.  Sticky Keys and Keyboard mouse are 
  46.      included in all ROM 03 Apple IIgs computers.
  47.  
  48.  
  49. How It Works (Access Nothing and Checks For Free)
  50.  
  51. Universal Access generally works by replacing Apple IIgs toolbox functions.  
  52. For example, CloseView patches QuickDraw so you do not draw to the actual 
  53. screen, but to another buffer that CloseView can then magnify.  Video Keyboard 
  54. patches the Window Manager so that its keyboard window is always frontmost and 
  55. fully visible (and accessible).  Easy Access uses the ADB tools and the Event 
  56. Manager to alter the way the hardware responds.
  57.  
  58. Since Universal Access changes the way the tools behave, your applications do 
  59. not have to work very hard to be accessible to a broad range of physically 
  60. challenged people.  Just by following the rules, you have an accessible 
  61. application.  There are, however, a few guidelines you should keep in mind 
  62. when designing your programs to make them as accessible as they can be.
  63.  
  64.  
  65. Universal Access Compatibility Guidelines
  66.  
  67. o  Try to avoid using modal dialogs.  Not only do lots of modal dialogs 
  68.    make for a cumbersome interface for everyone, they are especially 
  69.    annoying to those who have to move the mouse to a lot of OK buttons.  
  70.    More importantly, users cannot open NDAs like Video Keyboard while 
  71.    modal dialogs are frontmost.
  72.  
  73.    Video Keyboard can also be dragged in front of modal dialogs--if you 
  74.    are in the habit of using QuickDraw calls to draw items in Dialog 
  75.    Manager modal dialogs instead of creating custom dialog items.  Video 
  76.    Keyboard users can drag the keyboard window in front of your dialog 
  77.    and erase the items (since the only items redrawn are those by the 
  78.    Dialog Manager's update routine).
  79.  
  80. o  Use the Event Manager routines for event information.  Do not access 
  81.    any hardware directly or use the lower-level Miscellaneous Tools 
  82.    routines for user event information--you steal that information from 
  83.    Universal Access.  For example, use the Event Manager routine 
  84.    GetMouse to find the mouse location.  Do not use ReadMouse or you 
  85.    steal mouse movement information from Universal Access.
  86.  
  87. o  Call GetNextEvent or TaskMaster often.  Long delays between calls do 
  88.    not let NDAs like Video Keyboard get events.  If you cannot make 
  89.    these calls, at least call SystemTask.
  90.  
  91. o  Do not assume that the hardware location of the screen is $E12000.  
  92.    Universal Access components that manipulate the entire screen (like 
  93.    CloseView) move the virtual screen so the hardware can be used for 
  94.    the magnified screen image.
  95.  
  96.    To find the screen location, look at the ptrToPixImage field in a 
  97.    grafPort after calling OpenPort (or in your window's window record 
  98.    after NewWindow).  The image pointer gives the correct location of 
  99.    the screen.
  100.  
  101. o  Do not assume things about being the frontmost window.  Even if 
  102.    FrontWindow says you have the frontmost window, your visRgn may have 
  103.    pieces missing.  For example, the title bar of your window may be 
  104.    partially under the menu bar.  Or there may be a floating "windoid" 
  105.    (like Video Keyboard's window) over part of your window.
  106.  
  107.    For these reasons you should not draw directly to the screen without 
  108.    first examining your window's visRgn.  Do not just check for 
  109.    rectangularity--your visRgn could be rectangular and parts of your 
  110.    window still be obscured.  If you use QuickDraw for all your drawing, 
  111.    QuickDraw automatically clips drawing activity to be entirely within 
  112.    the visRgn, so this is not a problem.
  113.  
  114. o  Don't access QuickDraw data directly; use QuickDraw routines instead.  
  115.    For example, to access SCB data, use the QuickDraw routines GetSCB 
  116.    and SetSCB instead of reading the hardware at $E19D00.  CloseView may 
  117.    have those SCBs changed to reflect a magnified portion of the screen.  
  118.    Also use GetColorEntry, SetColorEntry, GetColorTable, and 
  119.    SetColorTable.  Don't access the hardware directly.
  120.  
  121. o  Try to allocate memory after starting the tools.  If you want to 
  122.    allocate memory before starting tools, do not use special memory.  
  123.    (Set the attrNoSpec bit in the attributes.)
  124.  
  125.  
  126. Further Reference
  127. _____________________________________________________________________________
  128.   o  Apple IIgs Toolbox Reference
  129.   o  Apple IIgs Firmware Reference 
  130.   o  Video Keyboard developer's package (APDA)
  131.  
  132.